package cn.com.biz;

import java.util.List;

import cn.com.dao.NewsDao;
import cn.com.entity.News;

public class NewsBiz {
	//新闻的biz文件
	private NewsDao newsdao;
	public NewsDao getNewsdao() {
		return newsdao;
	}

	public void setNewsdao(NewsDao newsdao) {
		this.newsdao = newsdao;
	}

	//查询所有新闻
	public List<News> selectAllNews(){
		List<News> list=newsdao.selectAllNews();
		return list;
	}
	//查询一条新闻
	public News selectOneNews(News news){
		News n=newsdao.selectOneNews(news);
		return n; 
	}
	//添加新闻
	public boolean addNews(News news){
		boolean bool=newsdao.addNews(news);
		return bool;
	}
	//更新新闻
	public boolean updateNews(News news){
		boolean bool=newsdao.updateNews(news);
		return bool;
	}
	//删除新闻
		public boolean deleteNews(News news){
			boolean bool=newsdao.deleteNews(news);
			return bool;
		}
}
